{% load i18n future wlcore_tags %}

<div id="header">
    <div class="branding">&nbsp;</div>
    <!-- Title -->
    <div class="admin-title">{{ sitesettings.website_name }}后台</div>
    {% if user.is_authenticated and user.is_staff %}
        <!-- Bookmarks (temporary) -->
        <ul id="user-tools">
            <!-- Username -->
            <li><strong>{% firstof user.first_name user.username %}</strong></li>
            <!-- Userlinks -->
            {% block userlinks %}
                <!-- Documentation -->
                {% url "django-admindocs-docroot" as docsroot %}
                {% if docsroot %}
                    <!--<li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>-->
                {% endif %}
                <!-- Change Password -->
                {% url "admin:password_change" as password_change_url %}
                {% if password_change_url %}
                    <li><a href="{{ password_change_url }}">
                        {% else %}
                    <li><a href="{{ root_path }}password_change/">
                {% endif %}
            {% trans 'Change password' %}</a></li>

               <li><a href="/core/Mysql2ES">同步数据</a></li>

                {% if request.user.is_superuser %}
                    {% candelcache as ifc %}
                    {% if ifc %}
                        <li><a href="/core/delcache">清除缓存</a></li>
                    {% endif %}
                {% endif %}

                <!--<li><a href="/" target="_blank">查看首页</a></li>-->
                <!-- Logout -->
                {% url "admin:logout" as logout_url %}
                {% if logout_url %}
                    <li><a href="{{ logout_url }}">
                        {% else %}
                    <li><a href="{{ root_path }}logout/">
                {% endif %}
            {% trans 'Log out' %}</a></li>
            {% endblock %}
        </ul>
    {% endif %}
</div>
